package com.water.app;

import java.util.Objects;

public class Goods {
    private int id;
    private double price;
    private String name;
    private int count;
    private String description;
    private String picture;
    private int type;
    private int userId;
    private int version;
    private int number;
    private int shopId;
    private int shopGoodsTypeId;
    private String typeName;
    private int status;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getShopGoodsTypeId() {
        return shopGoodsTypeId;
    }

    public void setShopGoodsTypeId(int shopGoodsTypeId) {
        this.shopGoodsTypeId = shopGoodsTypeId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Goods goods = (Goods) o;
        return id == goods.id && Double.compare(price, goods.price) == 0 && count == goods.count && userId == goods.userId && version == goods.version && number == goods.number && shopId == goods.shopId && Objects.equals(name, goods.name) && Objects.equals(description, goods.description) && Objects.equals(picture, goods.picture) && Objects.equals(type, goods.type);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, price, name, count, description, picture, type, userId, version, number, shopId);
    }

    public int getShopId() {
        return shopId;
    }

    public void setShopId(int shopId) {
        this.shopId = shopId;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    @Override
    public String toString() {
        return "Goods{" +
                "id=" + id +
                ", price=" + price +
                ", name='" + name + '\'' +
                ", count=" + count +
                ", description='" + description + '\'' +
                ", picture='" + picture + '\'' +
                ", type=" + type +
                ", userId=" + userId +
                ", version=" + version +
                ", number=" + number +
                ", shopId=" + shopId +
                ", shopGoodsTypeId=" + shopGoodsTypeId +
                '}';
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Goods() {
    }

    public Goods(int type,int id, double price, String name, int count, String describe, String picture) {
        this.id = id;
        this.price = price;
        this.name = name;
        this.count = count;
        this.description = describe;
        this.picture = picture;
        this.type=type;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getDescription() {
        return description;
    }


    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }
}